

<template>
  <div class="platformRrules">
    <!-- 头部 -->
    <!-- <div class="top">
        <top-info></top-info>
      </div> -->
    <!-- 中间内容 -->
    <div class="content">
      <div class="tips">
        <span class="tipsinfo" @click="goPTDT">平台动态</span>&nbsp;<span
          class="tipsinfo"
          >></span
        >&nbsp;&nbsp;<span class="tipsinfo" @click="goPTDT">全部</span
        >&nbsp;<span class="tipsinfo">></span> &nbsp;&nbsp;{{ tittle }}
      </div>
      <div class="all">
        <div class="tittle">{{ title }}</div>
        <div class="people">
          <span>{{ createtime }}</span>
          <span style="margin-left: 20px">易可易</span>
        </div>
      </div>

      <div v-if="content">
        <div class="content_text" v-html="content"></div>
      </div>

      <div v-else class="none_list">
        <NoContent></NoContent>
      </div>
    </div>
    <!-- 底部 -->
    <!-- <div class="plat_bottom">
        <home-page-bottom></home-page-bottom>
      </div> -->
  </div>
</template>
    
    <script setup>
// import topInfo from "../../components/topInfo.vue";
// import homePageBottom from "../../components/homePageBottom.vue";
import { ref, onMounted } from "vue";
import blackImg from "../../../assets/images/black.png";
import logoImg from "../../../assets/images/logo.png";
import NoContent from "../../../components/NoContent.vue";
import { PlatformInfoList } from "../../../api/platform";
import { useRouter } from "vue-router";
const router = useRouter();
defineProps({
  msg: String,
});

onMounted(() => {
  getPlatformInfoList();
});
const count = ref(0);
const tittle = router.currentRoute.value.query.tittle;
const id = router.currentRoute.value.query.id;

const type = ref("2");
const createtime = ref("");
const title = ref("");
console.log("tittle", tittle, id);
const content = ref(null);
const getPlatformInfoList = () => {
  PlatformInfoList(id, type.value).then((res) => {
    console.log("数据", res.data.content);
    content.value = res.data.content.replace(
      /<img/g,
      "<img style='max-width:100%;height:auto;'"
    );
    createtime.value = res.data.createtime;
    title.value = res.data.title;
  });
};

//去平台动态
const goPTDT = () => {
  router.push("/plat-form-dynamics");
};
</script>
    
    <style scoped lang="less">
/* .read-the-docs {
      color: #000;
    } */
.platformRrules {
  display: flex;
  flex-direction: column;
  // border: 1px solid red;
  // height: 100%;
  width: 100%;
  background: #f5f5f5;
  border-radius: 0px 0px 0px 0px;
  .top {
    // border: 1px solid green;
    margin: 0 auto;
    background-color: #fff;
    width: 100%;
  }
  .content {
    // border: 1px solid red;
    width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    // 没有数据
    .none_list {
      height: 617px;
      background: #ffffff;
      border-radius: 0px 0px 0px 0px;
      opacity: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      span {
        font-size: 22px;
        font-family: PingFang SC-Medium, PingFang SC;
        font-weight: 500;
        color: rgba(0, 0, 0, 0.87);
      }
    }
    .tips {
      height: 56px;
      line-height: 56px;
      border-radius: 0px 0px 0px 0px;
      opacity: 1;
      font-size: 14px;
      font-family: PingFang SC-Medium, PingFang SC;
      font-weight: 500;
      color: rgba(0, 0, 0, 0.87);
      .tipsinfo {
        color: #777e90;
        cursor: pointer;
      }
    }
    .all {
      height: 65px;
      background: #ffffff;
      border-radius: 0px 0px 0px 0px;
      opacity: 1;
      border: 1px solid #e6e6e6;
      display: flex;
      align-items: center;
      justify-content: space-between;
      box-sizing: border-box;
      padding: 0 16px;
      .tittle {
        font-size: 22px;
        font-family: PingFang SC-Bold, PingFang SC;
        font-weight: bold;
        color: rgba(0, 0, 0, 0.87);
        width: 900px;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
      }
      .people {
        display: flex;
      }
    }
    .content_list {
      min-height: 617px;
      background-color: #fff;
    }
    .content_text {
      background-color: #fff;
      // box-sizing: border-box;
      // height: 98px;
      border-radius: 0px 0px 0px 0px;
      padding: 14px 16px;
      // border: 1px solid red;
      min-height: calc(100vh - 402px);
      // display: flex;
      // justify-content: space-between;
      border-bottom: 1px solid #e6e6e6;
      .content_text_left {
        display: flex;
        align-items: center;
        // justify-content: center;
        .content_text_img {
          width: 147px;
          height: 98px;
          border-radius: 0px 0px 0px 0px;
          opacity: 1;
          // border: 1px solid green;
          img {
            height: 100%;
            width: 100%;
          }
        }
        .content_text_info {
          display: flex;
          flex-direction: column;
          margin-left: 12px;
          height: 100%;
          .tittle {
            height: 31px;
            font-size: 22px;
            font-family: PingFang SC-Bold, PingFang SC;
            font-weight: bold;
            color: rgba(0, 0, 0, 0.87);
            line-height: 31px;
            margin-top: 14px;
          }
          .tittle_info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 15px;
            .tittle_info_text {
              width: 602px;
              height: 22px;
              font-size: 16px;
              font-family: PingFang SC-Medium, PingFang SC;
              font-weight: 500;
              color: rgba(0, 0, 0, 0.87);
              line-height: 22px;
              text-overflow: ellipsis;
              -o-text-overflow: ellipsis;
              overflow: hidden;
              white-space: nowrap;
            }
            .notes {
              height: 22px;
              font-size: 16px;
              font-family: PingFang SC-Bold, PingFang SC;
              font-weight: bold;
              color: #2487e8;
              line-height: 22px;
            }
          }
        }
      }
      .content_text_time {
        // border: 1px solid red;
        display: flex;
        box-sizing: border-box;
        padding-top: 60px;
        .time {
          height: 22px;
          font-size: 16px;
          font-family: PingFang SC-Medium, PingFang SC;
          font-weight: 500;
          color: rgba(0, 0, 0, 0.87);
          line-height: 22px;
        }
        .name {
          height: 22px;
          font-size: 16px;
          font-family: PingFang SC-Medium, PingFang SC;
          font-weight: 500;
          color: rgba(0, 0, 0, 0.87);
          line-height: 22px;
          margin-left: 63px;
        }
      }
    }
    .pagination {
      height: 62px;
      padding: 0 16px;
      background: #ffffff;
      border-radius: 0px 0px 0px 0px;
      opacity: 1;
      border: 1px solid #e6e6e6;
      display: flex;
      align-items: center;
      justify-content: space-between;
      .total {
        height: 22px;
        font-size: 14px;
        font-family: PingFang SC-Regular, PingFang SC;
        font-weight: 400;
        color: #606266;
        line-height: 22px;
      }
    }
  }
  .plat_bottom {
    margin-top: 25px;
  }
}
</style>
    